450 HPLOT X +X2/2,Y -3 TO X +X2/2,Y +3: REM TRIANGLE TIC
460 DRAW 61 AT X +X1/2 -4,Y -Y1/2: DRAW 16 AT X +(X2 +X1)/2,Y -Y1/2: RETURN : REM TRIANGLE TICS
470 ROT= 16: DRAW 30 AT X +X1/2 +X2/2 +4,Y -Y1 -2: DRAW 30 AT X +X3/2 +2,Y -2: ROT= 0: REM VERT TICS (=)
480 HPLOT X +X1/2 -3,Y -Y1/2 TO X +X1/2 +3,Y -Y1/2: HPLOT X +(X2 +X3)/2 -3,Y -Y2/2 TO X +(X2 +X3)/2 +3,Y -Y2/2: IF J = 5 OR J = 7 THEN RETURN : REM HORIZ TICS
490 HPLOT X +X2/2 +X1/2,Y -Y2 -3 TO X +X2/2 +X1/2,Y -Y2 +3: HPLOT X +X3/2,Y -3 TO X +X3/2,Y +3
500 RETURN
510 N% = 5: GOSUB 610: RETURN
520 N% = 6: GOSUB 610: RETURN
530 N% = 8: GOSUB 610: RETURN
540 N% = 10: GOSUB 610: RETURN
550 Z1 = 60:S1 = 0:X1 = 73:Z = 18: GOSUB 660: RETURN : REM CIRCLE
560 VTAB 21: HTAB 1: PRINT L$: PRINT " <- -> to Select Return to Execute": PRINT TAB( 4)" Up and Down Arrows May be Used": PRINT L$;: RETURN
570 LINE = ( PEEK(4) +1)/2: RETURN
580 FOR I = 1 TO LEN(X$): DRAW ASC( MID$ ((X$),I,1)) -31 AT X +6 *I,Y: NEXT : RETURN
590 DRAW ASC(X$) -31 AT X,Y: RETURN : REM PLACE DIMENSIONS
600 REM DRAW POLYGON
610 FOR I = 1 TO N%:TH = 2 *PI *I/N% +(PI/8 *(N% >6)):XP%(I) = 29.2 *(1 + SIN(TH)):YP%(I) = 20 *(1 - COS(TH)): NEXT I
620 FOR I = 1 TO N% -1
630 HPLOT XP%(I) +X -4,YP%(I) +35 TO XP%(I +1) +X -4,YP%(I +1) +35: NEXT
640 HPLOT X -4 +XP%(I),YP%(I) +35 TO X -4 +XP%(1),YP%(1) +35: RETURN
800 A = 20:B = 20:C = 120:D = 100: HPLOT A,B TO A,D TO C,D TO C,B TO A,B: FOR I = 1 TO 3: HPLOT A -I,B +I TO A -I,D +I TO C -I,D +I: NEXT
810 X$ = "Select by < > ^ @":X = 1:Y = D +15: GOSUB 580:X$ = "and Press Return":Y = Y +10: GOSUB 580:X$ = "Escape for Main Menu":Y = Y +20: GOSUB 580:X$ = "? for Help":Y = Y +20:X = X +20: GOSUB 580:X = 1
820 X$ = "CHOICES":Y = B +5:X = (279 +C)/2 -20: GOSUB 580:Y = Y +1: GOSUB 580: HPLOT X -2,Y -3 TO X +53,Y -3 TO X +53,Y +9 TO X -2,Y +9 TO X -2,Y -3: HPLOT X -3,Y -2 TO X -3,Y +10 TO X +52,Y +10
830 RETURN
840 VTAB 23 +(Q >0): PRINT "Press Return to Continue...";: GET X$: POKE -16368,0:: HOME : POKE 49232,0: POKE 49237,0: POKE 49239,0: RETURN
860 DRAW ASC(X$) -31 AT +X +X1 -8,Y -((Y -Y1)/2) +(Y1/2) *(J = 5): RETURN : REM PUT a's, b's etc.
870 DRAW ASC(";") -31 AT X +6,Y -9: RETURN : REM THETA
880 FOR G = Y -Y1 TO Y STEP 2: HPLOT X +X1,G: NEXT G: DRAW ASC( CHR$(104)) -31 AT X +X1 +6,Y +5 -(Y -Y1)/2: RETURN
890 DRAW ASC(X$) -31 AT X +X2/2,Y +3: RETURN
900 GOSUB 390:X4 = X:Y4 = Y:X = X +15:Y = Y -8: GOSUB 390: REM PARALLELEPIPED
910 HPLOT X,Y TO X4,Y4: HPLOT X +X1,Y -Y1 TO X4 +X1,Y4 -Y1: HPLOT X +X2,Y -Y2 TO X4 +X2,Y4 -Y2: HPLOT X +X3,Y -Y3 TO X4 +X3,Y4 -Y3
920 Y = Y +8: GOSUB 850: RETURN
930 Y = Y +8: GOSUB 400:X4 = X:Y4 = Y:X = X +20:Y = Y -15: GOSUB 400: GOSUB 910:Y = Y -7: RETURN : REM CUBE
940 X = X -15: GOSUB 380:X4 = X:Y4 = Y:X = X +40:Y = Y -15: GOSUB 380: REM PRISM
950 HPLOT X,Y TO X4,Y4: HPLOT X +X1,Y -Y1 TO X4 +X1,Y4 -Y1: HPLOT X +X2,Y TO X4 +X2,Y4:X = X -40:Y = Y4: GOSUB 850: RETURN
960 Y = Y4:X = X +15: GOSUB 850: RETURN
970 Y = Y +8:X1 = 15:X2 = 45:X3 = X2 -X1:Y1 = 18:Y2 = Y1: GOSUB 680:X4 = X +25:Y4 = Y -55: HPLOT X,Y TO X4,Y4: HPLOT X +X1,Y -Y1 TO X4,Y4: HPLOT X +X2,Y -Y2 TO X4,Y4: HPLOT X +X3,Y +Y3 TO X4,Y4: REM PYRAMID
980 Y = Y -10: GOSUB 850: RETURN
990 GOSUB 550: REM SPHERE
1000 FOR I = 0 TO PI STEP PI/64: HPLOT X1 +18 * COS(I),Z1 +6 * SIN(I): NEXT : REM ELLIPSE
1010 FOR I = PI TO 2 *PI STEP PI/16: HPLOT X1 +18 * COS(I),Z1 +6 * SIN(I): NEXT
1020 IF J < >7 THEN HPLOT X1,Z1 TO X1 +Z,Z1
1030 RETURN
1040 Z1 = 70:X1 = 73:Z = 18: GOSUB 1000: HPLOT X1 -Z,Z1 TO X1,23 TO X1 +Z,Z1: RETURN : REM CONE
1050 HPLOT X1,23 TO X1,Z1 TO X1 +Z,Z1: RETURN : REM CONE
1060 Z1 = 70:Z3 = Z1:X1 = 73:Z = 18: GOSUB 1000:Z1 = 30: GOSUB 1000: FOR G = X1 -Z TO X1 +Z STEP Z: HPLOT G,Z1 TO G,Z3: NEXT G: HPLOT X1,Z3 TO X1 +Z,Z3: RETURN : REM CONE
1770 GOSUB 690: GOSUB 720: GOSUB 720: GOSUB 720:X$ = "Drill Complete.":X = 25:Y = 60: GOSUB 580:X$ = "Press Return...":Y = 70: GOSUB 580: GET X$: HOME : TEXT : FOR I = 1 TO 15:CH%(I) = 0: NEXT : ON FLAG GOTO 1410,1410,1310,1310,1310
1780 ON FLAG GOTO 1790,1800,1810,1870,1870
1790 HOME : TEXT : VTAB 2: PRINT PG$(J): VTAB 10: PRINT Q1$(J): GOSUB 840: GOTO 1620
1800 HOME : TEXT : VTAB 2: PRINT SG$(J): VTAB 10: PRINT Q2$(J): GOSUB 840: GOTO 1620
1810 GOSUB 1270
1820 FOR Q = 1 TO 4: HTAB 3: PRINT H1$(Q);: HTAB 12: PRINT H2$(Q): NEXT : PRINT : FOR Q = 5 TO 7: HTAB 3: PRINT H1$(Q);: HTAB 12: PRINT H2$(Q): NEXT
1830 FOR Q = 8 TO 9: HTAB 2: PRINT H1$(Q);: HTAB 12: PRINT H2$(Q): NEXT : PRINT : HTAB 3: PRINT H1$(10);: HTAB 12: PRINT H2$(10)
1840 FOR Q = 11 TO 15: HTAB 2: PRINT H1$(Q);: HTAB 12: PRINT H2$(Q): IF Q = 13 THEN PRINT
1850 NEXT : PRINT
1860 GOSUB 840:Q = 0:X$ = "": GOTO 1620
1870 GOSUB 1270: FOR Q = 1 TO 2: HTAB 3: PRINT H1$(Q);: HTAB 12: PRINT H2$(Q): NEXT : HTAB 3: PRINT H1$(3);: HTAB 12: PRINT H2$(2): PRINT
1880 FOR Q = 5 TO 7: HTAB 3: PRINT H1$(Q);: HTAB 12: PRINT H2$(Q): NEXT : HTAB 3: PRINT CHR$(108);: HTAB 12: PRINT "Slant height of figure": PRINT
1890 FOR Q = 14 TO 15: HTAB 2: PRINT H1$(Q);: HTAB 12: PRINT H2$(Q): NEXT : PRINT
1900 IF FLAG = 5 THEN HTAB 3: PRINT "A";: HTAB 12: PRINT "The Area of the base": PRINT : PRINT : PRINT "NOTE:The prism base is the triangular": HTAB 6: PRINT "end.The prism is drawn on its side."
1910 GOSUB 840:Q = 0:X$ = "": GOTO 1620
1920 HOME : HTAB 12: PRINT "HELP - MAIN MENU": PRINT L$: PRINT : PRINT "NIBBLE GEOMETRY is a recognition and": PRINT : PRINT "drill program designed to improve your": PRINT : PRINT "familiarity with the more common plane": PRINT
1930 PRINT "and solid geometric figures and recog-": PRINT : PRINT "nition of the mathematical relation-": PRINT : PRINT "ships between the figures and their": PRINT : PRINT "areas and volumes."
1940 PRINT : PRINT "Use the '?' key frequently for help in": PRINT : PRINT "using the program.": VTAB 24: PRINT "Press Return to continue...";: GET X$: POKE -16368,0: RETURN
1950 REM SOLIDS RECOG.
1960 FLAG = 2: GOSUB 650:X$ = "SOLID": GOSUB 790
1970 GOSUB 750:N = 7:N1 = 7
1980 FOR J = 1 TO N:X$ = STR$(J) +". " +SG$(J):X = C +17:Y = (9 *J) +B +10: GOSUB 580: NEXT :N = 7: GOTO 1510
1990 REM PLANE AREAS
2000 FLAG = 3: GOSUB 650:X$ = "AREAS OF PLANE FIGURES":X = 72:Y = 1: GOSUB 580: GOSUB 800
2010 GOSUB 750:N1 = 9: FOR J = 1 TO N1:X$ = STR$(J) +". " +"A = " +EQ$(J):X = C +13:Y = (9 *J) +B +10: GOSUB 580: NEXT : REM SHOW EQUATIONS
2020 N = 15: FOR K = 1 TO N
2030 J = INT( RND(1) *N) +1: IF CH%(J) = 1 THEN 2030
2040 CH%(J) = 1:ANS = FN P(J):X = A +25:Y = 70
2050 ON J GOSUB 350,360,370,380,390,400,410,420,430,440,550,510,520,530,540: REM DRAW FIGURES
2060 ON J GOSUB 460,500,500,500,500,500,500,480: REM ADD TICS
2070 GOSUB 500
2080 ON J GOSUB 1070,1070,1080,1070,1090,1100,1110,1120,1140,1120,1150,1160,1160,1160,1160: REM ADD DESCRIPTORS
2090 GOTO 1610
2100 FLAG = 4: GOSUB 650:X$ = "AREAS OF SOLID FIGURES":X = 72:Y = 1: GOSUB 580: GOSUB 800
2110 N1 = 10: FOR J = 1 TO N1 -1:X$ = " " + STR$(J) +". " +"A = " +AQ$(J):X = C +13:Y = (9 *J) +B +10: GOSUB 580: GOSUB 580: REM SHOW EQUATIONS
2120 IF J = 4 THEN HPLOT 210,70 TO 212,73 TO 216,65 TO 249,65
2180 FLAG = 5: GOSUB 650:X$ = "VOLUME OF SOLID FIGURES":X = 72:Y = 1: GOSUB 580: GOSUB 800
2190 N1 = 9: FOR J = 1 TO N1:X$ = STR$(J) +". " +"V = " +VQ$(J):X = C +13:Y = (9 *J) +B +10: GOSUB 580: REM SHOW EQUATIONS
2200 NEXT :N = 7: GOTO 1510
2210 REM PG$(I)-Plane geometry names
2220 DATA " Isoceles Triangle"," Scalene Triangle"," Right Triangle"," Equilateral Triangle"
2230 DATA " Rectangle"," Square"," Parallelogram"," Rhombus"," Trapezoid"
2240 DATA "Trapezium","Circle","Pentagon","Hexagon","Octagon","Decagon"
2250 REM SOUND ROUTINE
2260 DATA 166,7,173,48,192,165,6,32,168,252,202,208,245,96
2270 REM Q1$(I) - HELP RESPONSES
2280 DATA "Three sided figure - 2 sides equal.","Three sided figure - no sides equal.","Three sided figure with one right (90 degree) angle included.","Three sided figure - all sides equal.": REM 7 SPACES
2290 DATA "A quadrilateral with four right (90 degree) angles.","A four sided plane figure with four equal sides and four right angles.","A four sided plane figure with opposite sides equal and parallel."
2300 DATA "An equilateral parallellogram with oblique (non 90 degree) angles.","A four sided plane figure with only two sides parallel.","A plane figure with four sides, none of which are parallel.": REM 6 SPACES
2310 DATA "A plane figure bounded by a single curved line, every point of which is equally distant from the point at the center of the figure.": REM 6,4,3 SPACES
2320 DATA "A plane figure with five angles and fivesides.","A plane figure with six angles and six sides.","A plane figure with eight angles and eight sides.","A figure with ten sides and ten angles."
2330 REM SG$(I) - SOLID SHAPES
2340 DATA "Cube","Sphere","Parallelepiped","Right circular cone","Right pyramid","Prism","Right cylinder"
2350 REM Q2$(I) - SOLID SHAPES HELP
2360 DATA "A solid with six equal, square sides.","A round figure having the surface equally distant from the center at all points.": REM 7 SPACES
2370 DATA "A solid with six faces, each of which is a parallellogram.","A solid described by the hypotenuse of a right triangle rotated about either ofits legs as an axis."
2380 DATA "A solid figure having a polygonal base the sides of which form the bases of triangular surfaces meeting at a common vertex."
2390 DATA "A solid figure whose ends are polygonal,equal in size and shape, and parallel, and whose sides are parallellograms."
2400 DATA "A solid figure described by the edge of a rectangle rotated around the parallel edge as axis; the ends are parallel and equal circles."
2410 REM EQ$(I) - AREA EQUATIONS-PLANES
2420 DATA "hb/2","ab",,"bh","' cd","' (a+b)h","' cd SIN(;)",,
2430 DATA "a","Length of a side","b","Length of a side","c","Length of a diagonal","d","Length of a diagonal","n","# of sides to polygon","r","radius of circle"
2440 DATA "h","Altitude of polygon","SIN","Trigonometric SINE function","COT","Trig COTANGENT function","A","Area of polygon","theta","Greek symbol similar to"," ","(0), which represents an"," ","an angle measured in degrees"
2450 DATA "pi","Greek symbol for the"," ","constant value 3.1416"
2460 REM SOLID AREA EQUATIONS
2470 DATA ,,"2ab + 2bc + 2ac"
2480 DATA ,"' nal","h(a+b+c)","2! rh","Base areas not included."
2490 DATA ,,"abc",,"Ah/3","Ah",
2500 IF PEEK(222) = 6 THEN HOME : VTAB 10: PRINT "BINARY FILE NOT ON DISK OR MIS-NAMED": PRINT : PRINT "THE PROGRAM CANNOT CONTINUE. CORRECT": PRINT "THE SITUATION AND RE-RUN THE PROGRAM.": END
2510 HOME : VTAB 10: PRINT "A DISK ERROR HAS BEEN ENCOUNTERED.": PRINT : PRINT "CHECK YOUR DRIVE DOOR OR RE-SEAT YOUR": PRINT "DISK."
2520 VTAB 20: HTAB 1: PRINT : PRINT "PRESS RETURN TO RETRY, ESCAPE TO QUIT";: GET X$: IF X$ = CHR$(13) THEN RUN